/**
 * 
 */
package cn.softTank.BpelModelImpl;

import org.dom4j.DocumentHelper;
import org.dom4j.Element;

import cn.softTank.BpelModel.MessageExchange;

/**
 * @author Yuzone (smartzxy@gmail.com)
 * 
 */
public class MessageExchangeImpl implements MessageExchange {

	private String name;

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.softTank.BpelModel.MessageExchange#getName()
	 */
	@Override
	public String getName() {
		return name;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.softTank.BpelModel.MessageExchange#setName(java.lang.String)
	 */
	@Override
	public void setName(String value) {
		name = value;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.softTank.BpelModel.XmlAdapt#toElement()
	 */
	@Override
	public Element toElement() {
		Element e = DocumentHelper.createElement("messageExchange");
		if (name != null)
			e.addAttribute("name", name);
		return e;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.softTank.BpelModel.XmlAdapt#toXml()
	 */
	@Override
	public String toXml() {
		// TODO Auto-generated method stub
		return null;
	}

}
